#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    for (int i = n; i > 0; i--)
    {
        for (int space = 0; space < n - i; space++)
            printf(" ");
        for (int j = 1; j < i * 2; j++)
            printf("%d", i);
        for (int space = 0; space < n - i; space++)
            printf(" ");
        printf("\n");
    }
    for (int i = 2; i <= n; i++)
    {
        for (int space = 0; space < n - i; space++)
            printf(" ");
        for (int j = 1; j < i * 2; j++)
            printf("%d", i);
        for (int space = 0; space < n - i; space++)
            printf(" ");
        printf("\n");
    }
    return 0;
}